package cn.ljy.uem.model;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;


/**
 * 课程类
 *
 * @author 小锋
 * @date 2022/07/18
 */
@ApiModel(value = "课程")
@Data
@NoArgsConstructor
public class SchoolCourse implements java.io.Serializable {

    // 在mapper关联部门属性
    private Long id;

    //所属部门
    private Integer departmentId;

    //所属专业
    private Integer majorId;

    //课程负责人
    private Long teacherId;

    //课程编号
    private String courseNumber;

    //课程名
//    @NotNull(message = "课程名称不能为空")
    private String name;

    //课程图片地址，封面
    private String cover;

    //课程类型（1、专业基础课，2、专业核心课，3、专业实践课，4、公共选修课，5、公共必修课）
//    @NotNull(message = "课程类型不能为空")
    private Integer type;

    //学分
    private Integer credit;

    //学时
    private Integer period;

    //周学时
    private String weekHours;

    //考核方式
    private String examination;

    //课程介绍
    private String intro;


    //是否推荐
    private Boolean recommend;

    //判断是否失效，即课程已经不再使用,true表示失效
    private Boolean expired;

    //创建时间
    private Date createTime;

    //更新时间
    private Date updateTime;


    //非数据库字段
    private SchoolMajor schoolMajor;

    private SchoolDepartment schoolDepartment;

    private SchoolTeacher schoolTeacher;

    private SchoolClass schoolClass;//所属班级信息

    public SchoolCourse(Long id) {
        this.id = id;
    }

}
